package net.hzlj.platform.enterprise.socket.impl;

import net.hzlj.platform.enterprise.socket.SocketService;
import net.hzlj.platform.enterprise.socket.mina.MinaClientManager;

/**
 * @Description: Mina连接方式实现
 * @Author: Jason Zhang
 * @Date: 2017/06/28
 */

public class MinaSocketImpl implements SocketService {

    @Override
    public void reconnect() {
        MinaClientManager.getInstance().reconnect();
    }

    @Override
    public void sendMessage(String message) {
        MinaClientManager.getInstance().sendMessage(message);
    }

    @Override
    public void close() {
        MinaClientManager.getInstance().close();
    }

    @Override
    public boolean isConnection() {
        return MinaClientManager.getInstance().isConnection();
    }
}
